
using System;

namespace BeeTest
{

	public class ReturnGivenState<T0, T1, T2>
	{
		#region Fields & Properties

		internal T0 state0;
		internal T1 state1;
		internal T2 state2;

		#endregion


		#region Constructors

		public ReturnGivenState(T0 s0, T1 s1, T2 s2)
		{
			this.state0 = s0;
			this.state1 = s1;
			this.state2 = s2;
		}
	
		#endregion


		#region Operations

		public GivenState<T0, T1, T2, TR> Given<TR>(Func<TR> givenFunc)
		{
			TR result = givenFunc();
			var state = new GivenState<T0, T1, T2, TR>(this.state0, this.state1, this.state2, result);
			return state;
		}


		public GivenState<T0, T1, T2, TR> Given<TP0, TR>(Func<TP0, TR> givenFunc, TP0 arg0)
		{
			TR result = givenFunc(arg0);
			var state = new GivenState<T0, T1, T2, TR>(this.state0, this.state1, this.state2, result);
			return state;
		}


		public GivenState<T0, T1, T2, TR> Given<TP0, TP1, TR>(Func<TP0, TP1, TR> givenFunc, TP0 arg0, TP1 arg1)
		{
			TR result = givenFunc(arg0, arg1);
			var state = new GivenState<T0, T1, T2, TR>(this.state0, this.state1, this.state2, result);
			return state;
		}


		public GivenState<T0, T1, T2, TR> Given<TP0, TP1, TP2, TR>(Func<TP0, TP1, TP2, TR> givenFunc, TP0 arg0, TP1 arg1, TP2 arg2)
		{
			TR result = givenFunc(arg0, arg1, arg2);
			var state = new GivenState<T0, T1, T2, TR>(this.state0, this.state1, this.state2, result);
			return state;
		}


		public GivenState<T0, T1, T2, TR> Given<TP0, TP1, TP2, TP3, TR>(Func<TP0, TP1, TP2, TP3, TR> givenFunc, TP0 arg0, TP1 arg1, TP2 arg2, TP3 arg3)
		{
			TR result = givenFunc(arg0, arg1, arg2, arg3);
			var state = new GivenState<T0, T1, T2, TR>(this.state0, this.state1, this.state2, result);
			return state;
		}


		public GivenState<T0, T1, T2, TR> Given<TP0, TP1, TP2, TP3, TP4, TR>(Func<TP0, TP1, TP2, TP3, TP4, TR> givenFunc, TP0 arg0, TP1 arg1, TP2 arg2, TP3 arg3, TP4 arg4)
		{
			TR result = givenFunc(arg0, arg1, arg2, arg3, arg4);
			var state = new GivenState<T0, T1, T2, TR>(this.state0, this.state1, this.state2, result);
			return state;
		}


		public GivenState<T0, T1, T2, TR> Given<TP0, TR>(Func<TP0, TR> givenFunc, Func<GivenState<T0, T1, T2>, TP0> forwarder0)
		{
			var arg0 = forwarder0(new GivenState<T0, T1, T2>(this.state0, this.state1, this.state2));
			TR result = givenFunc(arg0);
			var state = new GivenState<T0, T1, T2, TR>(this.state0, this.state1, this.state2, result);
			return state;
		}


		public GivenState<T0, T1, T2, TR> Given<TP0, TP1, TR>(Func<TP0, TP1, TR> givenFunc, Func<GivenState<T0, T1, T2>, TP0> forwarder0, TP1 arg1)
		{
			var arg0 = forwarder0(new GivenState<T0, T1, T2>(this.state0, this.state1, this.state2));
			TR result = givenFunc(arg0, arg1);
			var state = new GivenState<T0, T1, T2, TR>(this.state0, this.state1, this.state2, result);
			return state;
		}


		public GivenState<T0, T1, T2, TR> Given<TP0, TP1, TP2, TR>(Func<TP0, TP1, TP2, TR> givenFunc, Func<GivenState<T0, T1, T2>, TP0> forwarder0, TP1 arg1, TP2 arg2)
		{
			var arg0 = forwarder0(new GivenState<T0, T1, T2>(this.state0, this.state1, this.state2));
			TR result = givenFunc(arg0, arg1, arg2);
			var state = new GivenState<T0, T1, T2, TR>(this.state0, this.state1, this.state2, result);
			return state;
		}


		public GivenState<T0, T1, T2, TR> Given<TP0, TP1, TP2, TP3, TR>(Func<TP0, TP1, TP2, TP3, TR> givenFunc, Func<GivenState<T0, T1, T2>, TP0> forwarder0, TP1 arg1, TP2 arg2, TP3 arg3)
		{
			var arg0 = forwarder0(new GivenState<T0, T1, T2>(this.state0, this.state1, this.state2));
			TR result = givenFunc(arg0, arg1, arg2, arg3);
			var state = new GivenState<T0, T1, T2, TR>(this.state0, this.state1, this.state2, result);
			return state;
		}


		public GivenState<T0, T1, T2, TR> Given<TP0, TP1, TP2, TP3, TP4, TR>(Func<TP0, TP1, TP2, TP3, TP4, TR> givenFunc, Func<GivenState<T0, T1, T2>, TP0> forwarder0, TP1 arg1, TP2 arg2, TP3 arg3, TP4 arg4)
		{
			var arg0 = forwarder0(new GivenState<T0, T1, T2>(this.state0, this.state1, this.state2));
			TR result = givenFunc(arg0, arg1, arg2, arg3, arg4);
			var state = new GivenState<T0, T1, T2, TR>(this.state0, this.state1, this.state2, result);
			return state;
		}


		public GivenState<T0, T1, T2, TR> Given<TP0, TP1, TR>(Func<TP0, TP1, TR> givenFunc, Func<GivenState<T0, T1, T2>, TP0> forwarder0, Func<GivenState<T0, T1, T2>, TP1> forwarder1)
		{
			var arg0 = forwarder0(new GivenState<T0, T1, T2>(this.state0, this.state1, this.state2));
			var arg1 = forwarder1(new GivenState<T0, T1, T2>(this.state0, this.state1, this.state2));
			TR result = givenFunc(arg0, arg1);
			var state = new GivenState<T0, T1, T2, TR>(this.state0, this.state1, this.state2, result);
			return state;
		}


		public GivenState<T0, T1, T2, TR> Given<TP0, TP1, TP2, TR>(Func<TP0, TP1, TP2, TR> givenFunc, Func<GivenState<T0, T1, T2>, TP0> forwarder0, Func<GivenState<T0, T1, T2>, TP1> forwarder1, TP2 arg2)
		{
			var arg0 = forwarder0(new GivenState<T0, T1, T2>(this.state0, this.state1, this.state2));
			var arg1 = forwarder1(new GivenState<T0, T1, T2>(this.state0, this.state1, this.state2));
			TR result = givenFunc(arg0, arg1, arg2);
			var state = new GivenState<T0, T1, T2, TR>(this.state0, this.state1, this.state2, result);
			return state;
		}


		public GivenState<T0, T1, T2, TR> Given<TP0, TP1, TP2, TP3, TR>(Func<TP0, TP1, TP2, TP3, TR> givenFunc, Func<GivenState<T0, T1, T2>, TP0> forwarder0, Func<GivenState<T0, T1, T2>, TP1> forwarder1, TP2 arg2, TP3 arg3)
		{
			var arg0 = forwarder0(new GivenState<T0, T1, T2>(this.state0, this.state1, this.state2));
			var arg1 = forwarder1(new GivenState<T0, T1, T2>(this.state0, this.state1, this.state2));
			TR result = givenFunc(arg0, arg1, arg2, arg3);
			var state = new GivenState<T0, T1, T2, TR>(this.state0, this.state1, this.state2, result);
			return state;
		}


		public GivenState<T0, T1, T2, TR> Given<TP0, TP1, TP2, TP3, TP4, TR>(Func<TP0, TP1, TP2, TP3, TP4, TR> givenFunc, Func<GivenState<T0, T1, T2>, TP0> forwarder0, Func<GivenState<T0, T1, T2>, TP1> forwarder1, TP2 arg2, TP3 arg3, TP4 arg4)
		{
			var arg0 = forwarder0(new GivenState<T0, T1, T2>(this.state0, this.state1, this.state2));
			var arg1 = forwarder1(new GivenState<T0, T1, T2>(this.state0, this.state1, this.state2));
			TR result = givenFunc(arg0, arg1, arg2, arg3, arg4);
			var state = new GivenState<T0, T1, T2, TR>(this.state0, this.state1, this.state2, result);
			return state;
		}


		public GivenState<T0, T1, T2, TR> Given<TP0, TP1, TP2, TR>(Func<TP0, TP1, TP2, TR> givenFunc, Func<GivenState<T0, T1, T2>, TP0> forwarder0, Func<GivenState<T0, T1, T2>, TP1> forwarder1, Func<GivenState<T0, T1, T2>, TP2> forwarder2)
		{
			var arg0 = forwarder0(new GivenState<T0, T1, T2>(this.state0, this.state1, this.state2));
			var arg1 = forwarder1(new GivenState<T0, T1, T2>(this.state0, this.state1, this.state2));
			var arg2 = forwarder2(new GivenState<T0, T1, T2>(this.state0, this.state1, this.state2));
			TR result = givenFunc(arg0, arg1, arg2);
			var state = new GivenState<T0, T1, T2, TR>(this.state0, this.state1, this.state2, result);
			return state;
		}


		public GivenState<T0, T1, T2, TR> Given<TP0, TP1, TP2, TP3, TR>(Func<TP0, TP1, TP2, TP3, TR> givenFunc, Func<GivenState<T0, T1, T2>, TP0> forwarder0, Func<GivenState<T0, T1, T2>, TP1> forwarder1, Func<GivenState<T0, T1, T2>, TP2> forwarder2, TP3 arg3)
		{
			var arg0 = forwarder0(new GivenState<T0, T1, T2>(this.state0, this.state1, this.state2));
			var arg1 = forwarder1(new GivenState<T0, T1, T2>(this.state0, this.state1, this.state2));
			var arg2 = forwarder2(new GivenState<T0, T1, T2>(this.state0, this.state1, this.state2));
			TR result = givenFunc(arg0, arg1, arg2, arg3);
			var state = new GivenState<T0, T1, T2, TR>(this.state0, this.state1, this.state2, result);
			return state;
		}


		public GivenState<T0, T1, T2, TR> Given<TP0, TP1, TP2, TP3, TP4, TR>(Func<TP0, TP1, TP2, TP3, TP4, TR> givenFunc, Func<GivenState<T0, T1, T2>, TP0> forwarder0, Func<GivenState<T0, T1, T2>, TP1> forwarder1, Func<GivenState<T0, T1, T2>, TP2> forwarder2, TP3 arg3, TP4 arg4)
		{
			var arg0 = forwarder0(new GivenState<T0, T1, T2>(this.state0, this.state1, this.state2));
			var arg1 = forwarder1(new GivenState<T0, T1, T2>(this.state0, this.state1, this.state2));
			var arg2 = forwarder2(new GivenState<T0, T1, T2>(this.state0, this.state1, this.state2));
			TR result = givenFunc(arg0, arg1, arg2, arg3, arg4);
			var state = new GivenState<T0, T1, T2, TR>(this.state0, this.state1, this.state2, result);
			return state;
		}


		public GivenState<T0, T1, T2, TR> Given<TR>(TR obj)
		{
			var state = new GivenState<T0, T1, T2, TR>(this.state0, this.state1, this.state2, obj);
			return state;
		}



		#endregion
	}
}
